package com.hxh.component.business.ui;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * author mardawang
 * <p>
 * email:wy363681759@163.com
 * <p>
 * date: 2018/5/2
 * <p>
 * desc:
 */

public class MyRecycleViewDivider extends RecyclerView.ItemDecoration {
    private Paint paint = new Paint();
    private int dividerHeight = 1;
    private int i = 0;

    public MyRecycleViewDivider(Context context, int dividerHeight) {
//        this.paint.setColor(color);
        this.dividerHeight = dividerHeight;
    }

    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        super.getItemOffsets(outRect, view, parent, state);
        outRect.set(0, 0, 0, this.dividerHeight);

    }

    public void onDraw(Canvas canvas, RecyclerView parent, RecyclerView.State state) {
        super.onDraw(canvas, parent, state);
        int childcount = parent.getChildCount();
    }
}
